package com.netease.c.a;

import java.util.Hashtable;

public class e
{
  private static final byte a = 54;
  private static final byte b = 92;
  private static Hashtable h = new Hashtable();
  private c c;
  private int d;
  private int e = 64;
  private byte[] f;
  private byte[] g;

  static
  {
    h.put("GOST3411", new Integer(32));
    h.put("MD2", new Integer(16));
    h.put("MD4", new Integer(64));
    h.put("MD5", new Integer(64));
    h.put("RIPEMD128", new Integer(64));
    h.put("RIPEMD160", new Integer(64));
    h.put("SHA-1", new Integer(64));
    h.put("SHA-224", new Integer(64));
    h.put("SHA-256", new Integer(64));
    h.put("SHA-384", new Integer(128));
    h.put("SHA-512", new Integer(128));
    h.put("Tiger", new Integer(64));
    h.put("Whirlpool", new Integer(64));
  }

  public e(c paramc)
  {
    this.c = paramc;
    this.d = paramc.e();
    Integer localInteger = (Integer)h.get(paramc.d());
    if (localInteger == null)
      throw new IllegalArgumentException("unknown digest passed");
    this.e = localInteger.intValue();
    this.f = new byte[this.e];
    this.g = new byte[this.e];
  }

  public int a(byte[] paramArrayOfByte, int paramInt)
  {
    byte[] arrayOfByte = new byte[this.d];
    this.c.b(arrayOfByte, 0);
    this.c.a(this.g, 0, this.g.length);
    this.c.a(arrayOfByte, 0, arrayOfByte.length);
    int i = this.c.b(paramArrayOfByte, paramInt);
    d();
    return i;
  }

  public String a()
  {
    return this.c.d() + "/HMAC";
  }

  public void a(byte paramByte)
  {
    this.c.a(paramByte);
  }

  public void a(b paramb)
  {
    this.c.b();
    byte[] arrayOfByte1 = paramb.a();
    if (arrayOfByte1.length > this.e)
    {
      this.c.a(arrayOfByte1, 0, arrayOfByte1.length);
      this.c.b(this.f, 0);
      for (int m = this.d; m < this.f.length; m++)
        this.f[m] = 0;
    }
    System.arraycopy(arrayOfByte1, 0, this.f, 0, arrayOfByte1.length);
    for (int i = arrayOfByte1.length; i < this.f.length; i++)
      this.f[i] = 0;
    this.g = new byte[this.f.length];
    System.arraycopy(this.f, 0, this.g, 0, this.f.length);
    for (int j = 0; j < this.f.length; j++)
    {
      byte[] arrayOfByte3 = this.f;
      arrayOfByte3[j] = (byte)(0x36 ^ arrayOfByte3[j]);
    }
    for (int k = 0; k < this.g.length; k++)
    {
      byte[] arrayOfByte2 = this.g;
      arrayOfByte2[k] = (byte)(0x5C ^ arrayOfByte2[k]);
    }
    this.c.a(this.f, 0, this.f.length);
  }

  public void a(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  {
    this.c.a(paramArrayOfByte, paramInt1, paramInt2);
  }

  public c b()
  {
    return this.c;
  }

  public int c()
  {
    return this.d;
  }

  public void d()
  {
    this.c.b();
    this.c.a(this.f, 0, this.f.length);
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.c.a.e
 * JD-Core Version:    0.6.0
 */